<?php

namespace app\home\validate;

use think\Validate;

class Comments extends Validate
{
    protected $rule =   [
        'fromid'  => 'require',
        'contents'  => 'require',
        'sqid'  => 'require',

    ];

    protected $message  =   [
        'id.require' => '数据缺失',
        'contents.require' => '请输入评价内容',
        'sqid.require' => '请选择你要评论的动态',


    ];

    protected $scene = [
        'list' => ['id'],
        'add' => ['fromid,contents,sqid,toid'],
    ];
}
